package fr.axones.pocketagile.ui.components.view
{
	import spark.components.View;
	
	public class CustomView extends View
	{
		public function CustomView()
		{
			super();
		}
		
		//----------------------------------
		//  actionBarVisible
		//----------------------------------
		private var _actionBarVisible:Boolean = true;
		
		[Inspectable(category="General", defaultValue="true")]
		/**
		 *  Specifies whether a view should show the action bar or not.
		 *  This property does not necessarily correlate to the 
		 *  <code>visible</code> property of the view navigator's ActionBar control. 
		 *
		 *  @default true
		 * 
		 *  @langversion 3.0
		 *  @playerversion AIR 2.5
		 *  @productversion Flex 4.5
		 */
		override public function get actionBarVisible():Boolean
		{
			return _actionBarVisible;
		}
		
		/**
		 *  @private
		 */ 
		override public function set actionBarVisible(value:Boolean):void
		{
			_actionBarVisible = value;
			
			// Immediately request actionBar's visibility be toggled
			if (isActive && navigator)
			{
				if (_actionBarVisible)
					navigator.showActionBar(false);
				else
					navigator.hideActionBar(false);
			}
		}
	}
}